<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<c:set var="contextPath" value="${pageContext.request.contextPath}"></c:set>
<jsp:useBean id="update_date" class="java.util.Date" />
<c:set target="${update_date}" property="time"
	value="${entity.update_date}" />

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="${contextPath}/css/bootstrap.min.css">
<script src="${contextPath}/js/jquery.min.js"></script>
<script src="${contextPath}/js/bootstrap.min.js"></script>
<script src="${contextPath}/scripts/jquery-1.9.1.min.js"></script>
<script src="${contextPath}/bootstrap2.3.2/js/bootstrap.min.js"></script>
<script src="${contextPath}/js/tools.js"></script>
<style type="text/css">
body {
	margin: 5px;
	font-size: 14px;
	padding: 0px;
	background-color: #A2A9B4;
}

.tips {
	color: #f00;
	font-size: 95%;
}
</style>
</head>
<body>
	<a href="javascript:history.back(-1);">&lt;返回</a>
	<div class="panel panel-info">
		<div class="panel-heading">
			<h3 class="panel-title">基础信息</h3>
		</div>
		<div class="panel-body">
			<table class="table table-condensed">
				<tr>
					<td>锁ID</td>
					<td>${entity.id}</td>
				</tr>
				<tr>
					<td>锁编号</td>
					<td>${entity.device_no}</td>
				</tr>
				<tr>
					<td>手机号码</td>
					<td>${entity.phone_number}</td>
				</tr>
				<tr>
					<td>SIM号</td>
					<td>${entity.sim_no}</td>
				</tr>
				<tr>
					<td>备注</td>
					<td>${entity.device_desc}</td>
				</tr>
			</table>
		</div>
	</div>

	<div class="panel panel-info">
		<div class="panel-heading">
			<h3 class="panel-title">监控信息</h3>
		</div>
		<div class="panel-body">
			<table class="table table-condensed">
				<tr>
					<td>当前经纬度</td>
					<td>${entity.latitude},${entity.longitude}</td>
				</tr>
				<tr>
					<td>经纬度类型</td>
					<td>
					<c:if test="${entity.na1==1}">
							<span>GPS定位</span>
						</c:if> <c:if test="${entity.na1==2}">
							<span>LBS(基站)定位</span>
						</c:if>
					</td>
				</tr>
				<tr>
					<td>锁电量</td>
					<td>${entity.battery_status}</td>
				</tr>
				<tr>
					<td>温度</td>
					<td>${entity.temperature}</td>
				</tr>
				<tr>
					<td>电池电压</td>
					<td>${entity.vbattery}</td>
				</tr>
				<tr>
					<td>固件版本</td>
					<td>${entity.sys_version}</td>
				</tr>
				<tr>
					<td>硬件版本</td>
					<td>${entity.hdware_version}</td>
				</tr>
				<tr>
					<td>信号指标</td>
					<td>${entity.na2}</td>
				</tr>
			</table>
		</div>
	</div>

	<div class="panel panel-info">
		<div class="panel-heading">
			<h3 class="panel-title">状态信息</h3>
		</div>
		<div class="panel-body">
			<table class="table table-condensed">
				<tr>
					<td>开锁状态</td>
					<td><c:if test="${entity.status==2}">开</c:if> <c:if
							test="${entity.status==1}">关</c:if></td>
				</tr>
				<tr>
					<td>故障状态</td>
					<td><c:if test="${entity.falut==1}">
							<span>无故障</span>
						</c:if> <c:if test="${entity.falut==2}">
							<span class="tips">维护模式</span>
						</c:if> <c:if test="${entity.falut==3}">
							<span class="tips">有故障</span>
						</c:if></td>
				</tr>
				<tr>
					<td>充电状态</td>
					<td><c:if test="${entity.charge == 2}">未充电</c:if>
						<c:if test="${entity.charge == 1}">充电中</c:if>
					</td>
				</tr>
				<tr>
					<td>更新时间</td>
					<td><fmt:formatDate pattern="yyyy-MM-dd HH:mm:ss"
							value="${update_date}" type="time"></fmt:formatDate></td>
				</tr>
			</table>
		</div>
	</div>
</body>
</html>
